Skip to content

New package: surge-0.6.9#58998

Open
rayfadh wants to merge 1 commit intovoid-linux:masterfrom
rayfadh:surge-0.6.6
Open

New package: surge-0.6.9#58998
rayfadh wants to merge 1 commit intovoid-linux:masterfrom
rayfadh:surge-0.6.6

Conversation

@rayfadh
Copy link
Contributor

@rayfadh rayfadh commented Feb 14, 2026

Testing the changes

  • I tested the changes in this PR: YES

New package

Local build testing

  • I built this PR locally for my native architecture, x86_64 (glibc)
  • I built this PR locally for these architectures (if supported. mark crossbuilds):
    • armv6l (crossbuild)

@tranzystorekk tranzystorekk added the new-package This PR adds a new package label Feb 14, 2026
@rayfadh rayfadh marked this pull request as draft February 24, 2026 02:13
@rayfadh
Copy link
Contributor Author

rayfadh commented Feb 24, 2026

@fanyx Hi, any solution for this?

=> surge-0.6.6_1: running do_check ...
go: downloading github.com/stretchr/testify v1.11.1
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading github.com/davecgh/go-spew v1.1.1
?   	github.com/surge-downloader/surge	[no test files]
ok  	github.com/surge-downloader/surge/cmd	2.180s
ok  	github.com/surge-downloader/surge/internal/benchmark	0.024s
ok  	github.com/surge-downloader/surge/internal/clipboard	0.003s
ok  	github.com/surge-downloader/surge/internal/config	0.009s
ok  	github.com/surge-downloader/surge/internal/core	21.296s
ok  	github.com/surge-downloader/surge/internal/download	16.195s
?   	github.com/surge-downloader/surge/internal/engine	[no test files]
2026/02/24 02:29:50 httptest.Server blocked in Close after 5 seconds, waiting for connections:
  *net.TCPConn 0xc00040e000 127.0.0.1:54204 in state active
  *net.TCPConn 0xc000104000 127.0.0.1:54214 in state active
  *net.TCPConn 0xc000104008 127.0.0.1:54210 in state active
2026/02/24 02:30:45 State DB Error: failed to create tables: unable to open database file: out of memory (14)
--- FAIL: TestConcurrentDownloader_SwitchOn429 (0.21s)
    switch_429_test.go:76: Download took 208.737159ms, indicating backoff was applied via sleep (expected skip)
FAIL
FAIL	github.com/surge-downloader/surge/internal/engine/concurrent	64.164s
ok  	github.com/surge-downloader/surge/internal/engine/events	0.006s
ok  	github.com/surge-downloader/surge/internal/engine/single	34.501s
ok  	github.com/surge-downloader/surge/internal/engine/state	4.657s
ok  	github.com/surge-downloader/surge/internal/engine/types	0.006s
ok  	github.com/surge-downloader/surge/internal/testutil	0.126s
ok  	github.com/surge-downloader/surge/internal/tui	2.340s
?   	github.com/surge-downloader/surge/internal/tui/colors	[no test files]
ok  	github.com/surge-downloader/surge/internal/tui/components	0.006s
ok  	github.com/surge-downloader/surge/internal/utils	0.106s
?   	github.com/surge-downloader/surge/internal/version	[no test files]
FAIL
=> ERROR: surge-0.6.6_1: do_check: '${make_check_pre} go test -p "$XBPS_MAKEJOBS" -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${make_check_args} ${make_check_target}' exited with 1
=> ERROR:   in do_check() at common/build-style/go.sh:66

Current template:

# Template file for 'surge'
pkgname=surge
version=0.6.6
revision=1
build_style=go
go_import_path=github.com/surge-downloader/surge
go_ldflags="-X ${go_import_path}/cmd.Version=${version}"
short_desc="Blazing fast TUI download manager built in Go"
maintainer="rayfadh <rayfadh@duck.com>"
license="MIT"
homepage="https://github.com/surge-downloader/surge"
changelog="https://github.com/surge-downloader/surge/releases"
distfiles="https://github.com/surge-downloader/surge/archive/refs/tags/v${version}.tar.gz"
checksum=c52831a2aa5609c6261fbc54b3f38ca2680738657a27f784b3bf87c21faa2578

post_install() {
	vlicense LICENSE
}

Currently I put make_check=no to bypass the error.

@rayfadh
Copy link
Contributor Author

rayfadh commented Feb 24, 2026

Using the ldflags cause that error in my observation, CMIIW.

Should I go with:

make_check_args="-skip TestConcurrentDownloader_SwitchOn429"

or override the do_check()?

do_check() {
	go test -p "$XBPS_MAKEJOBS" ./...
}

@rayfadh rayfadh marked this pull request as ready for review February 24, 2026 03:40
@rayfadh rayfadh marked this pull request as draft February 24, 2026 03:44
@rayfadh rayfadh force-pushed the surge-0.6.6 branch 3 times, most recently from 142cba9 to 014399a Compare February 24, 2026 04:20
@rayfadh
Copy link
Contributor Author

rayfadh commented Feb 24, 2026

I tried upgrading to 0.6.8, a specific test is also failing.

=> surge-0.6.8_1: running do_check ...
go: downloading github.com/stretchr/testify v1.11.1
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
?   	github.com/surge-downloader/surge	[no test files]
ok  	github.com/surge-downloader/surge/cmd	(cached)
ok  	github.com/surge-downloader/surge/internal/benchmark	(cached)
ok  	github.com/surge-downloader/surge/internal/clipboard	(cached)
ok  	github.com/surge-downloader/surge/internal/config	(cached)
--- FAIL: TestLocalDownloadService_Delete_ActiveWithoutDB_RemovesPartialFile (0.19s)
    local_service_test.go:131: delete failed: database is locked (5) (SQLITE_BUSY)
FAIL
FAIL	github.com/surge-downloader/surge/internal/core	25.942s
ok  	github.com/surge-downloader/surge/internal/download	(cached)
?   	github.com/surge-downloader/surge/internal/engine	[no test files]
ok  	github.com/surge-downloader/surge/internal/engine/concurrent	65.891s
ok  	github.com/surge-downloader/surge/internal/engine/events	(cached)
ok  	github.com/surge-downloader/surge/internal/engine/single	(cached)
ok  	github.com/surge-downloader/surge/internal/engine/state	(cached)
ok  	github.com/surge-downloader/surge/internal/engine/types	(cached)
ok  	github.com/surge-downloader/surge/internal/testutil	(cached)
ok  	github.com/surge-downloader/surge/internal/tui	(cached)
?   	github.com/surge-downloader/surge/internal/tui/colors	[no test files]
ok  	github.com/surge-downloader/surge/internal/tui/components	(cached)
ok  	github.com/surge-downloader/surge/internal/utils	(cached)
?   	github.com/surge-downloader/surge/internal/version	[no test files]
FAIL
=> ERROR: surge-0.6.8_1: do_check: 'go test -p "$XBPS_MAKEJOBS" ./...' exited with 1
=> ERROR:   in do_check() at srcpkgs/surge/template:17

@rayfadh
Copy link
Contributor Author

rayfadh commented Feb 24, 2026

Just putting this here

0.6.6 x86_64 glibc

=> surge-0.6.6_1: running do_check ...
go: downloading github.com/stretchr/testify v1.11.1
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading github.com/davecgh/go-spew v1.1.1
?       github.com/surge-downloader/surge    [no test files]
ok      github.com/surge-downloader/surge/cmd    2.180s
ok      github.com/surge-downloader/surge/internal/benchmark    0.024s
ok      github.com/surge-downloader/surge/internal/clipboard    0.003s
ok      github.com/surge-downloader/surge/internal/config    0.009s
ok      github.com/surge-downloader/surge/internal/core    21.296s
ok      github.com/surge-downloader/surge/internal/download    16.195s
?       github.com/surge-downloader/surge/internal/engine    [no test files]
2026/02/24 02:29:50 httptest.Server blocked in Close after 5 seconds, waiting for connections:
  *net.TCPConn 0xc00040e000 127.0.0.1:54204 in state active
  *net.TCPConn 0xc000104000 127.0.0.1:54214 in state active
  *net.TCPConn 0xc000104008 127.0.0.1:54210 in state active
2026/02/24 02:30:45 State DB Error: failed to create tables: unable to open database file: out of memory (14)
--- FAIL: TestConcurrentDownloader_SwitchOn429 (0.21s)
    switch_429_test.go:76: Download took 208.737159ms, indicating backoff was applied via sleep (expected skip)
FAIL
FAIL    github.com/surge-downloader/surge/internal/engine/concurrent    64.164s
ok      github.com/surge-downloader/surge/internal/engine/events    0.006s
ok      github.com/surge-downloader/surge/internal/engine/single    34.501s
ok      github.com/surge-downloader/surge/internal/engine/state    4.657s
ok      github.com/surge-downloader/surge/internal/engine/types    0.006s
ok      github.com/surge-downloader/surge/internal/testutil    0.126s
ok      github.com/surge-downloader/surge/internal/tui    2.340s
?       github.com/surge-downloader/surge/internal/tui/colors    [no test files]
ok      github.com/surge-downloader/surge/internal/tui/components    0.006s
ok      github.com/surge-downloader/surge/internal/utils    0.106s
?       github.com/surge-downloader/surge/internal/version    [no test files]
FAIL
=> ERROR: surge-0.6.6_1: do_check: '${make_check_pre} go test -p "$XBPS_MAKEJOBS" -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${make_check_args} ${make_check_target}' exited with 1
=> ERROR:   in do_check() at common/build-style/go.sh:66

0.6.6 i686

=> surge-0.6.6_1: running do_check ...
go: downloading github.com/stretchr/testify v1.11.1
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
?       github.com/surge-downloader/surge   [no test files]
ok      github.com/surge-downloader/surge/cmd   0.632s
ok      github.com/surge-downloader/surge/internal/benchmark    0.027s
ok      github.com/surge-downloader/surge/internal/clipboard    0.005s
ok      github.com/surge-downloader/surge/internal/config   0.018s
panic: unaligned 64-bit atomic operation

goroutine 50 [running]:
internal/runtime/atomic.panicUnaligned()
    /usr/lib/go/src/internal/runtime/atomic/unaligned.go:8 +0x2d
internal/runtime/atomic.Xadd64(0x98a6304, 0x80000)
    /usr/lib/go/src/internal/runtime/atomic/atomic_386.s:127 +0x11
github.com/surge-downloader/surge/internal/engine/concurrent.(*ConcurrentDownloader).downloadTask(0x9922460, {0x8728dd4, 0x98ae1b0}, {0x981c330, 0x16}, 0x9916698, 0x98a62a0, {0x9c00000, 0x80000, 0x80000}, ...)
    /builddir/surge-0.6.6/internal/engine/concurrent/worker.go:313 +0xadc
github.com/surge-downloader/surge/internal/engine/concurrent.(*ConcurrentDownloader).worker(0x9922460, {0x8728dd4, 0x992b0b0}, 0x2, {0x99166e0, 0x1, 0x1}, 0x9916698, 0x992b1a0, 0x1f400000, ...)
    /builddir/surge-0.6.6/internal/engine/concurrent/worker.go:87 +0xeb0
github.com/surge-downloader/surge/internal/engine/concurrent.(*ConcurrentDownloader).Download.func5(0x2)
    /builddir/surge-0.6.6/internal/engine/concurrent/downloader.go:493 +0xed
created by github.com/surge-downloader/surge/internal/engine/concurrent.(*ConcurrentDownloader).Download in goroutine 8
    /builddir/surge-0.6.6/internal/engine/concurrent/downloader.go:491 +0xffc
FAIL    github.com/surge-downloader/surge/internal/core 0.094s
2026/02/24 04:22:57 State DB Error: state database not configured: call state.Configure() first
panic: unaligned 64-bit atomic operation

goroutine 339 [running]:
internal/runtime/atomic.panicUnaligned()
    /usr/lib/go/src/internal/runtime/atomic/unaligned.go:8 +0x2d
internal/runtime/atomic.Xadd64(0x90c4c34, 0x80000)
    /usr/lib/go/src/internal/runtime/atomic/atomic_386.s:127 +0x11
github.com/surge-downloader/surge/internal/engine/concurrent.(*ConcurrentDownloader).downloadTask(0x90ab6d0, {0x870239c, 0x90b8de0}, {0x901cdc8, 0x16}, 0x9094558, 0x90c4bd0, {0x9508000, 0x80000, 0x80000}, ...)
    /builddir/surge-0.6.6/internal/engine/concurrent/worker.go:313 +0xadc
github.com/surge-downloader/surge/internal/engine/concurrent.(*ConcurrentDownloader).worker(0x90ab6d0, {0x870239c, 0x90b8cc0}, 0x1, {0x9090600, 0x2, 0x2}, 0x9094558, 0x90b8d50, 0xc800000, ...)
    /builddir/surge-0.6.6/internal/engine/concurrent/worker.go:87 +0xeb0
github.com/surge-downloader/surge/internal/engine/concurrent.(*ConcurrentDownloader).Download.func5(0x1)
    /builddir/surge-0.6.6/internal/engine/concurrent/downloader.go:493 +0xed
created by github.com/surge-downloader/surge/internal/engine/concurrent.(*ConcurrentDownloader).Download in goroutine 316
    /builddir/surge-0.6.6/internal/engine/concurrent/downloader.go:491 +0xffc
FAIL    github.com/surge-downloader/surge/internal/download 6.675s
?       github.com/surge-downloader/surge/internal/engine   [no test files]
panic: unaligned 64-bit atomic operation

goroutine 26 [running]:
internal/runtime/atomic.panicUnaligned()
    /usr/lib/go/src/internal/runtime/atomic/unaligned.go:8 +0x2d
internal/runtime/atomic.Xadd64(0xa400ed4, 0x80000)
    /usr/lib/go/src/internal/runtime/atomic/atomic_386.s:127 +0x11
github.com/surge-downloader/surge/internal/engine/concurrent.(*ConcurrentDownloader).downloadTask(0xa500640, {0x8706784, 0xa5075f0}, {0xa41c6c0, 0x16}, 0xa428778, 0xa400e70, {0xa700000, 0x80000, 0x80000}, ...)
    /builddir/surge-0.6.6/internal/engine/concurrent/worker.go:313 +0xadc
github.com/surge-downloader/surge/internal/engine/concurrent.(*ConcurrentDownloader).worker(0xa500640, {0x8706784, 0xa507440}, 0x0, {0xa4287d8, 0x1, 0x1}, 0xa428778, 0xa507530, 0x100000, ...)
    /builddir/surge-0.6.6/internal/engine/concurrent/worker.go:87 +0xeb0
github.com/surge-downloader/surge/internal/engine/concurrent.(*ConcurrentDownloader).Download.func5(0x0)
    /builddir/surge-0.6.6/internal/engine/concurrent/downloader.go:493 +0xed
created by github.com/surge-downloader/surge/internal/engine/concurrent.(*ConcurrentDownloader).Download in goroutine 20
    /builddir/surge-0.6.6/internal/engine/concurrent/downloader.go:491 +0xffc
FAIL    github.com/surge-downloader/surge/internal/engine/concurrent    0.031s
ok      github.com/surge-downloader/surge/internal/engine/events    0.005s
ok      github.com/surge-downloader/surge/internal/engine/single    34.239s
ok      github.com/surge-downloader/surge/internal/engine/state 0.343s
ok      github.com/surge-downloader/surge/internal/engine/types 0.005s
ok      github.com/surge-downloader/surge/internal/testutil 0.128s
ok      github.com/surge-downloader/surge/internal/tui  1.107s
?       github.com/surge-downloader/surge/internal/tui/colors   [no test files]
ok      github.com/surge-downloader/surge/internal/tui/components   0.005s
ok      github.com/surge-downloader/surge/internal/utils    0.108s
?       github.com/surge-downloader/surge/internal/version  [no test files]
FAIL
=> ERROR: surge-0.6.6_1: do_check: 'go test -p "$XBPS_MAKEJOBS" ./...' exited with 1
=> ERROR:   in do_check() at srcpkgs/surge/template:17

0.6.8 x86_64 glibc

=> surge-0.6.8_1: running do_check ...
go: downloading github.com/stretchr/testify v1.11.1
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.1
?       github.com/surge-downloader/surge   [no test files]
ok      github.com/surge-downloader/surge/cmd   3.427s
ok      github.com/surge-downloader/surge/internal/benchmark    0.029s
ok      github.com/surge-downloader/surge/internal/clipboard    0.008s
ok      github.com/surge-downloader/surge/internal/config   0.085s
--- FAIL: TestLocalDownloadService_Delete_ActiveWithoutDB_RemovesPartialFile (0.27s)
    local_service_test.go:131: delete failed: database is locked (5) (SQLITE_BUSY)
FAIL
FAIL    github.com/surge-downloader/surge/internal/core 28.257s
ok      github.com/surge-downloader/surge/internal/download 18.815s
?       github.com/surge-downloader/surge/internal/engine   [no test files]
ok      github.com/surge-downloader/surge/internal/engine/concurrent    64.403s
ok      github.com/surge-downloader/surge/internal/engine/events    0.008s
ok      github.com/surge-downloader/surge/internal/engine/single    34.464s
ok      github.com/surge-downloader/surge/internal/engine/state 4.401s
ok      github.com/surge-downloader/surge/internal/engine/types 0.008s
ok      github.com/surge-downloader/surge/internal/testutil 0.137s
ok      github.com/surge-downloader/surge/internal/tui  2.230s
?       github.com/surge-downloader/surge/internal/tui/colors   [no test files]
ok      github.com/surge-downloader/surge/internal/tui/components   0.007s
ok      github.com/surge-downloader/surge/internal/utils    0.109s
?       github.com/surge-downloader/surge/internal/version  [no test files]
FAIL
=> ERROR: surge-0.6.8_1: do_check: '${make_check_pre} go test -p "$XBPS_MAKEJOBS" -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${make_check_args} ${make_check_target}' exited with 1
=> ERROR:   in do_check() at common/build-style/go.sh:66

@rayfadh rayfadh changed the title New package: surge-0.6.6 New package: surge-0.6.8 Feb 24, 2026
@rayfadh rayfadh marked this pull request as ready for review February 24, 2026 10:49
@fanyx
Copy link
Contributor

fanyx commented Feb 24, 2026

i686 architecture seems to be broken altogether due to unaligned 64-bit atomic operation in ConcurrentDownloader code.
surge-downloader/Surge#201
Opened a bug report on their repository. Leave it broken for i686 for now.
All other builds and tests seem fine.

@rayfadh rayfadh marked this pull request as draft February 25, 2026 20:40
@fanyx
Copy link
Contributor

fanyx commented Feb 25, 2026

Can you update to 0.6.9 and re-enable i686 builds?
They have supposedly fixed the issue (hopefully, idk it's vibe coded af).

@rayfadh
Copy link
Contributor Author

rayfadh commented Feb 26, 2026

@fanyx Sorry if this is not the right place or if I'm asking the wrong person, but do you know why building with xbps-src throws the error database is locked (5) (SQLITE_BUSY) while manually cloning and testing doesn't? I can't find similar problems here in void-packages issues. On PR ci it's surprisingly passes..

@rayfadh rayfadh marked this pull request as ready for review February 26, 2026 01:22
@rayfadh rayfadh changed the title New package: surge-0.6.8 New package: surge-0.6.9 Feb 26, 2026
@fanyx
Copy link
Contributor

fanyx commented Feb 26, 2026

dont think i know the solution to that issue.
you could ask in #voidlinux@irc.libera.chat on IRC for help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-package This PR adds a new package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants